@extends('layouts.default')
@section('content') 
<div class="box">
    <header>
        <div class="icons">
            <i class="fa fa-table"></i>                            
        </div>
        <h5>{{ Lang::get('messages.vehicle_repair') }}</h5>
    </header>
    <div id="collapse4" class="body">
        <table id="dataTable" class="table table-bordered table-condensed table-hover table-striped">
            <thead>
                <tr>
                    <th>ID</th>
                    <th>{{Lang::get('messages.make')}}</th>
                    <th>{{Lang::get('messages.model')}}</th>
                    <th>{{Lang::get('messages.license')}}</th>
                    <th>{{Lang::get('messages.milage')}}</th>
                    <th>{{Lang::get('messages.nr_repairs')}}</th>
                    <th>{{Lang::get('messages.last_maint_date')}}</th>
                </tr>
            </thead>
            <tbody>
                @foreach ($vehicle_repair as $v)
                <tr>    
                    <td>{{ $v->car_id }}</td>
                    <td>{{ link_to_action('CarController@show',$v->Make, $v->car_id)}}</td>  
                    <td>{{ $v->Model }}</td> 
                    <td>{{ $v->License}}</td> 
                    <td>{{ $v->Milage}}</td>                                                                    
                    <td>{{ $v->count}}</td> 
                    <td>{{ $v->max_date}}</td> 
                </tr>
                @endforeach
            </tbody>
        </table>
    </div>
</div> 
@stop
